<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE FlexibleInstances #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE Safe #-}</span><span class="hs-cpp">

#if MIN_VERSION_base(4,9,0)
</span><span class="hs-cpp">#define HAS_SEMIGROUP
</span><span class="hs-cpp">#endif
</span><span>
</span><span id="line-9"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Module      : Data.Binary.Put</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Copyright   : Lennart Kolmodin</span><span>
</span><span id="line-13"></span><span class="hs-comment">-- License     : BSD3-style (see LICENSE)</span><span>
</span><span id="line-14"></span><span class="hs-comment">--</span><span>
</span><span id="line-15"></span><span class="hs-comment">-- Maintainer  : Lennart Kolmodin &lt;kolmodin@gmail.com&gt;</span><span>
</span><span id="line-16"></span><span class="hs-comment">-- Stability   : stable</span><span>
</span><span id="line-17"></span><span class="hs-comment">-- Portability : Portable to Hugs and GHC. Requires MPTCs</span><span>
</span><span id="line-18"></span><span class="hs-comment">--</span><span>
</span><span id="line-19"></span><span class="hs-comment">-- The Put monad. A monad for efficiently constructing lazy bytestrings.</span><span>
</span><span id="line-20"></span><span class="hs-comment">--</span><span>
</span><span id="line-21"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Data.Binary.Put</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span>    </span><span class="annot"><span class="hs-comment">-- * The Put type</span></span><span>
</span><span id="line-26"></span><span>      </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier">Put</span></a></span><span>
</span><span id="line-27"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#PutM"><span class="hs-identifier">PutM</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span>
</span><span id="line-28"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#runPut"><span class="hs-identifier">runPut</span></a></span><span>
</span><span id="line-29"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#runPutM"><span class="hs-identifier">runPutM</span></a></span><span>
</span><span id="line-30"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putBuilder"><span class="hs-identifier">putBuilder</span></a></span><span>
</span><span id="line-31"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#execPut"><span class="hs-identifier">execPut</span></a></span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Flushing the implicit parse state</span></span><span>
</span><span id="line-34"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#flush"><span class="hs-identifier">flush</span></a></span><span>
</span><span id="line-35"></span><span>
</span><span id="line-36"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Primitives</span></span><span>
</span><span id="line-37"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord8"><span class="hs-identifier">putWord8</span></a></span><span>
</span><span id="line-38"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt8"><span class="hs-identifier">putInt8</span></a></span><span>
</span><span id="line-39"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putByteString"><span class="hs-identifier">putByteString</span></a></span><span>
</span><span id="line-40"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putLazyByteString"><span class="hs-identifier">putLazyByteString</span></a></span><span class="hs-cpp">
#if MIN_VERSION_bytestring(0,10,4)
</span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putShortByteString"><span class="hs-identifier">putShortByteString</span></a></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-45"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Big-endian primitives</span></span><span>
</span><span id="line-46"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord16be"><span class="hs-identifier">putWord16be</span></a></span><span>
</span><span id="line-47"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord32be"><span class="hs-identifier">putWord32be</span></a></span><span>
</span><span id="line-48"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord64be"><span class="hs-identifier">putWord64be</span></a></span><span>
</span><span id="line-49"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt16be"><span class="hs-identifier">putInt16be</span></a></span><span>
</span><span id="line-50"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt32be"><span class="hs-identifier">putInt32be</span></a></span><span>
</span><span id="line-51"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt64be"><span class="hs-identifier">putInt64be</span></a></span><span>
</span><span id="line-52"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putFloatbe"><span class="hs-identifier">putFloatbe</span></a></span><span>
</span><span id="line-53"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putDoublebe"><span class="hs-identifier">putDoublebe</span></a></span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Little-endian primitives</span></span><span>
</span><span id="line-56"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord16le"><span class="hs-identifier">putWord16le</span></a></span><span>
</span><span id="line-57"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord32le"><span class="hs-identifier">putWord32le</span></a></span><span>
</span><span id="line-58"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord64le"><span class="hs-identifier">putWord64le</span></a></span><span>
</span><span id="line-59"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt16le"><span class="hs-identifier">putInt16le</span></a></span><span>
</span><span id="line-60"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt32le"><span class="hs-identifier">putInt32le</span></a></span><span>
</span><span id="line-61"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt64le"><span class="hs-identifier">putInt64le</span></a></span><span>
</span><span id="line-62"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putFloatle"><span class="hs-identifier">putFloatle</span></a></span><span>
</span><span id="line-63"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putDoublele"><span class="hs-identifier">putDoublele</span></a></span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Host-endian, unaligned writes</span></span><span>
</span><span id="line-66"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWordhost"><span class="hs-identifier">putWordhost</span></a></span><span>           </span><span class="hs-comment">-- :: Word   -&gt; Put</span><span>
</span><span id="line-67"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord16host"><span class="hs-identifier">putWord16host</span></a></span><span>         </span><span class="hs-comment">-- :: Word16 -&gt; Put</span><span>
</span><span id="line-68"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord32host"><span class="hs-identifier">putWord32host</span></a></span><span>         </span><span class="hs-comment">-- :: Word32 -&gt; Put</span><span>
</span><span id="line-69"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord64host"><span class="hs-identifier">putWord64host</span></a></span><span>         </span><span class="hs-comment">-- :: Word64 -&gt; Put</span><span>
</span><span id="line-70"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInthost"><span class="hs-identifier">putInthost</span></a></span><span>            </span><span class="hs-comment">-- :: Int    -&gt; Put</span><span>
</span><span id="line-71"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt16host"><span class="hs-identifier">putInt16host</span></a></span><span>          </span><span class="hs-comment">-- :: Int16  -&gt; Put</span><span>
</span><span id="line-72"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt32host"><span class="hs-identifier">putInt32host</span></a></span><span>          </span><span class="hs-comment">-- :: Int32  -&gt; Put</span><span>
</span><span id="line-73"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt64host"><span class="hs-identifier">putInt64host</span></a></span><span>          </span><span class="hs-comment">-- :: Int64  -&gt; Put</span><span>
</span><span id="line-74"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putFloathost"><span class="hs-identifier">putFloathost</span></a></span><span>
</span><span id="line-75"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putDoublehost"><span class="hs-identifier">putDoublehost</span></a></span><span>
</span><span id="line-76"></span><span>
</span><span id="line-77"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Unicode</span></span><span>
</span><span id="line-78"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putCharUtf8"><span class="hs-identifier">putCharUtf8</span></a></span><span>
</span><span id="line-79"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putStringUtf8"><span class="hs-identifier">putStringUtf8</span></a></span><span>
</span><span id="line-80"></span><span>
</span><span id="line-81"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Data.Monoid.html#"><span class="hs-identifier">Data.Monoid</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Monoid</span></span><span>
</span><span id="line-84"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Binary.Builder.html"><span class="hs-identifier">Data.Binary.Builder</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Builder.Internal.html#Builder"><span class="hs-identifier">Builder</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Builder.html#toLazyByteString"><span class="hs-identifier">toLazyByteString</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-85"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Data.Binary.Builder.html"><span class="hs-identifier">Data.Binary.Builder</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">B</span></span><span>
</span><span id="line-86"></span><span>
</span><span id="line-87"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Int.html#"><span class="hs-identifier">Data.Int</span></a></span><span>
</span><span id="line-88"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Word.html#"><span class="hs-identifier">Data.Word</span></a></span><span>
</span><span id="line-89"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.html#"><span class="hs-identifier">Data.ByteString</span></a></span><span>      </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">S</span></span><span>
</span><span id="line-90"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.html#"><span class="hs-identifier">Data.ByteString.Lazy</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">L</span></span><span class="hs-cpp">
#if MIN_VERSION_bytestring(0,10,4)
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Short.html#"><span class="hs-identifier">Data.ByteString.Short</span></a></span><span class="hs-cpp">
#endif
</span><span class="hs-cpp">
#ifdef HAS_SEMIGROUP
</span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Semigroup.html#"><span class="hs-identifier">Data.Semigroup</span></a></span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-99"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Applicative.html#"><span class="hs-identifier">Control.Applicative</span></a></span><span>
</span><span id="line-100"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-comment">-- Silence AMP warning.</span><span>
</span><span id="line-101"></span><span>
</span><span id="line-102"></span><span class="hs-comment">-- needed for casting Floats/Doubles to words.</span><span>
</span><span id="line-103"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Binary.FloatCast.html"><span class="hs-identifier">Data.Binary.FloatCast</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Binary.FloatCast.html#floatToWord"><span class="hs-identifier">floatToWord</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Data.Binary.FloatCast.html#doubleToWord"><span class="hs-identifier">doubleToWord</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-106"></span><span>
</span><span id="line-107"></span><span class="hs-comment">-- XXX Strict in buffer only.</span><span>
</span><span id="line-108"></span><span class="hs-keyword">data</span><span> </span><span id="PairS"><span class="annot"><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-var">PairS</span></a></span></span><span> </span><span id="local-6989586621679056068"><span class="annot"><a href="#local-6989586621679056068"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="PairS"><span class="annot"><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-var">PairS</span></a></span></span><span> </span><span class="annot"><a href="#local-6989586621679056068"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Builder.Internal.html#Builder"><span class="hs-identifier hs-type">Builder</span></a></span><span>
</span><span id="line-109"></span><span>
</span><span id="line-110"></span><span id="local-6989586621679056083"><span class="annot"><a href="Data.Binary.Put.html#sndS"><span class="hs-identifier hs-type">sndS</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-type">PairS</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679056083"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Builder.Internal.html#Builder"><span class="hs-identifier hs-type">Builder</span></a></span></span><span>
</span><span id="line-111"></span><span id="sndS"><span class="annot"><span class="annottext">sndS :: forall a. PairS a -&gt; Builder
</span><a href="Data.Binary.Put.html#sndS"><span class="hs-identifier hs-var hs-var">sndS</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-type">PairS</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679055962"><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055962"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055962"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span class="hs-comment">-- | The PutM type. A Writer monad over the efficient Builder monoid.</span><span>
</span><span id="line-114"></span><span class="hs-keyword">newtype</span><span> </span><span id="PutM"><span class="annot"><a href="Data.Binary.Put.html#PutM"><span class="hs-identifier hs-var">PutM</span></a></span></span><span> </span><span id="local-6989586621679056080"><span class="annot"><a href="#local-6989586621679056080"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Put"><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-var">Put</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="unPut"><span class="annot"><span class="annottext">forall a. PutM a -&gt; PairS a
</span><a href="Data.Binary.Put.html#unPut"><span class="hs-identifier hs-var hs-var">unPut</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-type">PairS</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679056080"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-115"></span><span>
</span><span id="line-116"></span><span class="hs-comment">-- | Put merely lifts Builder into a Writer monad, applied to ().</span><span>
</span><span id="line-117"></span><span class="hs-keyword">type</span><span> </span><span id="Put"><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-var">Put</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#PutM"><span class="hs-identifier hs-type">PutM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-118"></span><span>
</span><span id="line-119"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679055957"><span class="annot"><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-type">Functor</span></a></span><span> </span><span class="annot"><a href="Data.Binary.Put.html#PutM"><span class="hs-identifier hs-type">PutM</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-120"></span><span>        </span><span id="local-6989586621679055955"><span class="annot"><span class="annottext">fmap :: forall a b. (a -&gt; b) -&gt; PutM a -&gt; PutM b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var hs-var hs-var hs-var">fmap</span></a></span></span><span> </span><span id="local-6989586621679055954"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679055954"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679055953"><span class="annot"><span class="annottext">PutM a
</span><a href="#local-6989586621679055953"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PairS b -&gt; PutM b
forall a. PairS a -&gt; PutM a
</span><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-var">Put</span></a></span><span> </span><span class="annot"><span class="annottext">(PairS b -&gt; PutM b) -&gt; PairS b -&gt; PutM b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">let</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-type">PairS</span></a></span><span> </span><span id="local-6989586621679055952"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055952"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679055951"><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055951"><span class="hs-identifier hs-var">w</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PutM a -&gt; PairS a
forall a. PutM a -&gt; PairS a
</span><a href="Data.Binary.Put.html#unPut"><span class="hs-identifier hs-var hs-var">unPut</span></a></span><span> </span><span class="annot"><span class="annottext">PutM a
</span><a href="#local-6989586621679055953"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">b -&gt; Builder -&gt; PairS b
forall a. a -&gt; Builder -&gt; PairS a
</span><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-var">PairS</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679055954"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055952"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055951"><span class="hs-identifier hs-var">w</span></a></span><span>
</span><span id="line-121"></span><span>        </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-pragma hs-type">fmap</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679055942"><span id="local-6989586621679055945"><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="annot"><a href="Data.Binary.Put.html#PutM"><span class="hs-identifier hs-type">PutM</span></a></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-124"></span><span>        </span><span id="local-6989586621679055939"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; PutM a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span id="local-6989586621679055938"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055938"><span class="hs-identifier hs-var">a</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PairS a -&gt; PutM a
forall a. PairS a -&gt; PutM a
</span><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-var">Put</span></a></span><span> </span><span class="annot"><span class="annottext">(PairS a -&gt; PutM a) -&gt; PairS a -&gt; PutM a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Builder -&gt; PairS a
forall a. a -&gt; Builder -&gt; PairS a
</span><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-var">PairS</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055938"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">Builder
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">Monoid.mempty</span></a></span><span>
</span><span id="line-125"></span><span>        </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#pure"><span class="hs-pragma hs-type">pure</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-126"></span><span>
</span><span id="line-127"></span><span>        </span><span id="local-6989586621679055936"><span class="annot"><span class="annottext">PutM (a -&gt; b)
</span><a href="#local-6989586621679055936"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679055935"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b. PutM (a -&gt; b) -&gt; PutM a -&gt; PutM b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;*&gt;</span></a></span></span><span> </span><span id="local-6989586621679055934"><span class="annot"><span class="annottext">PutM a
</span><a href="#local-6989586621679055934"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PairS b -&gt; PutM b
forall a. PairS a -&gt; PutM a
</span><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-var">Put</span></a></span><span> </span><span class="annot"><span class="annottext">(PairS b -&gt; PutM b) -&gt; PairS b -&gt; PutM b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-128"></span><span>            </span><span class="hs-keyword">let</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-type">PairS</span></a></span><span> </span><span id="local-6989586621679055933"><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679055933"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679055932"><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055932"><span class="hs-identifier hs-var">w</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PutM (a -&gt; b) -&gt; PairS (a -&gt; b)
forall a. PutM a -&gt; PairS a
</span><a href="Data.Binary.Put.html#unPut"><span class="hs-identifier hs-var hs-var">unPut</span></a></span><span> </span><span class="annot"><span class="annottext">PutM (a -&gt; b)
</span><a href="#local-6989586621679055936"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-129"></span><span>                </span><span class="annot"><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-type">PairS</span></a></span><span> </span><span id="local-6989586621679055931"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055931"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621679055930"><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055930"><span class="hs-identifier hs-var">w'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PutM a -&gt; PairS a
forall a. PutM a -&gt; PairS a
</span><a href="Data.Binary.Put.html#unPut"><span class="hs-identifier hs-var hs-var">unPut</span></a></span><span> </span><span class="annot"><span class="annottext">PutM a
</span><a href="#local-6989586621679055934"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-130"></span><span>            </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">b -&gt; Builder -&gt; PairS b
forall a. a -&gt; Builder -&gt; PairS a
</span><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-var">PairS</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; b
</span><a href="#local-6989586621679055933"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055931"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055932"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`Monoid.mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055930"><span class="hs-identifier hs-var">w'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-131"></span><span>
</span><span id="line-132"></span><span>        </span><span id="local-6989586621679055928"><span class="annot"><span class="annottext">PutM a
</span><a href="#local-6989586621679055928"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679055927"><span class="annot"><span class="annottext">*&gt; :: forall a b. PutM a -&gt; PutM b -&gt; PutM b
</span><a href="../../base/src/GHC.Base.html#%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">*&gt;</span></a></span></span><span> </span><span id="local-6989586621679055926"><span class="annot"><span class="annottext">PutM b
</span><a href="#local-6989586621679055926"><span class="hs-identifier hs-var">k</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PairS b -&gt; PutM b
forall a. PairS a -&gt; PutM a
</span><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-var">Put</span></a></span><span> </span><span class="annot"><span class="annottext">(PairS b -&gt; PutM b) -&gt; PairS b -&gt; PutM b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-133"></span><span>            </span><span class="hs-keyword">let</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-type">PairS</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679055925"><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055925"><span class="hs-identifier hs-var">w</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PutM a -&gt; PairS a
forall a. PutM a -&gt; PairS a
</span><a href="Data.Binary.Put.html#unPut"><span class="hs-identifier hs-var hs-var">unPut</span></a></span><span> </span><span class="annot"><span class="annottext">PutM a
</span><a href="#local-6989586621679055928"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-134"></span><span>                </span><span class="annot"><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-type">PairS</span></a></span><span> </span><span id="local-6989586621679055924"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679055924"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679055923"><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055923"><span class="hs-identifier hs-var">w'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PutM b -&gt; PairS b
forall a. PutM a -&gt; PairS a
</span><a href="Data.Binary.Put.html#unPut"><span class="hs-identifier hs-var hs-var">unPut</span></a></span><span> </span><span class="annot"><span class="annottext">PutM b
</span><a href="#local-6989586621679055926"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-135"></span><span>            </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">b -&gt; Builder -&gt; PairS b
forall a. a -&gt; Builder -&gt; PairS a
</span><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-var">PairS</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679055924"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055925"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`Monoid.mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055923"><span class="hs-identifier hs-var">w'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-136"></span><span>        </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">*&gt;</span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span class="hs-comment">-- Standard Writer monad, with aggressive inlining</span><span>
</span><span id="line-139"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="Data.Binary.Put.html#PutM"><span class="hs-identifier hs-type">PutM</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-140"></span><span>    </span><span id="local-6989586621679055914"><span class="annot"><span class="annottext">PutM a
</span><a href="#local-6989586621679055914"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679055913"><span class="annot"><span class="annottext">&gt;&gt;= :: forall a b. PutM a -&gt; (a -&gt; PutM b) -&gt; PutM b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;&gt;=</span></a></span></span><span> </span><span id="local-6989586621679055912"><span class="annot"><span class="annottext">a -&gt; PutM b
</span><a href="#local-6989586621679055912"><span class="hs-identifier hs-var">k</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PairS b -&gt; PutM b
forall a. PairS a -&gt; PutM a
</span><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-var">Put</span></a></span><span> </span><span class="annot"><span class="annottext">(PairS b -&gt; PutM b) -&gt; PairS b -&gt; PutM b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-141"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-type">PairS</span></a></span><span> </span><span id="local-6989586621679055911"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055911"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679055910"><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055910"><span class="hs-identifier hs-var">w</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PutM a -&gt; PairS a
forall a. PutM a -&gt; PairS a
</span><a href="Data.Binary.Put.html#unPut"><span class="hs-identifier hs-var hs-var">unPut</span></a></span><span> </span><span class="annot"><span class="annottext">PutM a
</span><a href="#local-6989586621679055914"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-142"></span><span>            </span><span class="annot"><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-type">PairS</span></a></span><span> </span><span id="local-6989586621679055909"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679055909"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679055908"><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055908"><span class="hs-identifier hs-var">w'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PutM b -&gt; PairS b
forall a. PutM a -&gt; PairS a
</span><a href="Data.Binary.Put.html#unPut"><span class="hs-identifier hs-var hs-var">unPut</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; PutM b
</span><a href="#local-6989586621679055912"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055911"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-143"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">b -&gt; Builder -&gt; PairS b
forall a. a -&gt; Builder -&gt; PairS a
</span><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-var">PairS</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679055909"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055910"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`Monoid.mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055908"><span class="hs-identifier hs-var">w'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-144"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">&gt;&gt;=</span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-145"></span><span>
</span><span id="line-146"></span><span>    </span><span id="local-6989586621679055906"><span class="annot"><span class="annottext">return :: forall a. a -&gt; PutM a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var hs-var hs-var hs-var">return</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; PutM a
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span>
</span><span id="line-147"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#return"><span class="hs-pragma hs-type">return</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span>    </span><span id="local-6989586621679055904"><span class="annot"><span class="annottext">&gt;&gt; :: forall a b. PutM a -&gt; PutM b -&gt; PutM b
</span><a href="../../base/src/GHC.Base.html#%3E%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&gt;&gt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PutM a -&gt; PutM b -&gt; PutM b
forall (f :: * -&gt; *) a b. Applicative f =&gt; f a -&gt; f b -&gt; f b
</span><a href="../../base/src/GHC.Base.html#%2A%3E"><span class="hs-operator hs-var">(*&gt;)</span></a></span><span>
</span><span id="line-150"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">&gt;&gt;</span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-151"></span><span>
</span><span id="line-152"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679055898"><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid.Monoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Binary.Put.html#PutM"><span class="hs-identifier hs-type">PutM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-153"></span><span>    </span><span id="local-6989586621679055895"><span class="annot"><span class="annottext">mempty :: PutM ()
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var hs-var hs-var hs-var">mempty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; PutM ()
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-154"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-pragma hs-type">mempty</span></a></span><span> </span><span class="hs-pragma">#-}</span><span class="hs-cpp">

#ifdef HAS_SEMIGROUP
</span><span>    </span><span id="local-6989586621679055893"><span class="annot"><span class="annottext">mappend :: PutM () -&gt; PutM () -&gt; PutM ()
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-identifier hs-var hs-var hs-var hs-var">mappend</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PutM () -&gt; PutM () -&gt; PutM ()
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">(&lt;&gt;)</span></a></span><span class="hs-cpp">
#else
</span><span>    </span><span class="hs-identifier">mappend</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">mappend'</span><span class="hs-cpp">
#endif
</span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-pragma hs-type">mappend</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-162"></span><span>
</span><span id="line-163"></span><span class="annot"><a href="Data.Binary.Put.html#mappend%27"><span class="hs-identifier hs-type">mappend'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-164"></span><span id="mappend%27"><span class="annot"><span class="annottext">mappend' :: PutM () -&gt; PutM () -&gt; PutM ()
</span><a href="Data.Binary.Put.html#mappend%27"><span class="hs-identifier hs-var hs-var">mappend'</span></a></span></span><span> </span><span id="local-6989586621679055891"><span class="annot"><span class="annottext">PutM ()
</span><a href="#local-6989586621679055891"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621679055890"><span class="annot"><span class="annottext">PutM ()
</span><a href="#local-6989586621679055890"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PairS () -&gt; PutM ()
forall a. PairS a -&gt; PutM a
</span><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-var">Put</span></a></span><span> </span><span class="annot"><span class="annottext">(PairS () -&gt; PutM ()) -&gt; PairS () -&gt; PutM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-165"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-type">PairS</span></a></span><span> </span><span class="annot"><span class="annottext">()
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679055889"><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055889"><span class="hs-identifier hs-var">w</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PutM () -&gt; PairS ()
forall a. PutM a -&gt; PairS a
</span><a href="Data.Binary.Put.html#unPut"><span class="hs-identifier hs-var hs-var">unPut</span></a></span><span> </span><span class="annot"><span class="annottext">PutM ()
</span><a href="#local-6989586621679055891"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-166"></span><span>        </span><span class="annot"><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-type">PairS</span></a></span><span> </span><span class="annot"><span class="annottext">()
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679055888"><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055888"><span class="hs-identifier hs-var">w'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PutM () -&gt; PairS ()
forall a. PutM a -&gt; PairS a
</span><a href="Data.Binary.Put.html#unPut"><span class="hs-identifier hs-var hs-var">unPut</span></a></span><span> </span><span class="annot"><span class="annottext">PutM ()
</span><a href="#local-6989586621679055890"><span class="hs-identifier hs-var">k</span></a></span><span>
</span><span id="line-167"></span><span>    </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">() -&gt; Builder -&gt; PairS ()
forall a. a -&gt; Builder -&gt; PairS a
</span><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-var">PairS</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055889"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="annot"><span class="annottext">Builder -&gt; Builder -&gt; Builder
forall a. Monoid a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-operator hs-var">`Monoid.mappend`</span></a></span><span> </span><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055888"><span class="hs-identifier hs-var">w'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-168"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#mappend%27"><span class="hs-pragma hs-type">mappend'</span></a></span><span> </span><span class="hs-pragma">#-}</span><span class="hs-cpp">

#ifdef HAS_SEMIGROUP
</span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679055883"><span id="local-6989586621679055885"><span class="annot"><a href="../../base/src/GHC.Base.html#Semigroup"><span class="hs-identifier hs-type">Semigroup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Binary.Put.html#PutM"><span class="hs-identifier hs-type">PutM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-172"></span><span>    </span><span id="local-6989586621679055881"><span class="annot"><span class="annottext">&lt;&gt; :: PutM () -&gt; PutM () -&gt; PutM ()
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;&gt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PutM () -&gt; PutM () -&gt; PutM ()
</span><a href="Data.Binary.Put.html#mappend%27"><span class="hs-identifier hs-var">mappend'</span></a></span><span>
</span><span id="line-173"></span><span>    </span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">(</span><span class="hs-pragma">&lt;&gt;</span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">#-}</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-176"></span><span class="annot"><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-type">tell</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Builder.Internal.html#Builder"><span class="hs-identifier hs-type">Builder</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-177"></span><span id="tell"><span class="annot"><span class="annottext">tell :: Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var hs-var">tell</span></a></span></span><span> </span><span id="local-6989586621679055879"><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055879"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PairS () -&gt; PutM ()
forall a. PairS a -&gt; PutM a
</span><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-var">Put</span></a></span><span> </span><span class="annot"><span class="annottext">(PairS () -&gt; PutM ()) -&gt; PairS () -&gt; PutM ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">() -&gt; Builder -&gt; PairS ()
forall a. a -&gt; Builder -&gt; PairS a
</span><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-var">PairS</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055879"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-178"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#tell"><span class="hs-pragma hs-type">tell</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-179"></span><span>
</span><span id="line-180"></span><span class="annot"><a href="Data.Binary.Put.html#putBuilder"><span class="hs-identifier hs-type">putBuilder</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Builder.Internal.html#Builder"><span class="hs-identifier hs-type">Builder</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-181"></span><span id="putBuilder"><span class="annot"><span class="annottext">putBuilder :: Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putBuilder"><span class="hs-identifier hs-var hs-var">putBuilder</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span>
</span><span id="line-182"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putBuilder"><span class="hs-pragma hs-type">putBuilder</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-183"></span><span>
</span><span id="line-184"></span><span class="hs-comment">-- | Run the 'Put' monad</span><span>
</span><span id="line-185"></span><span id="local-6989586621679056036"><span class="annot"><a href="Data.Binary.Put.html#execPut"><span class="hs-identifier hs-type">execPut</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#PutM"><span class="hs-identifier hs-type">PutM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679056036"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Builder.Internal.html#Builder"><span class="hs-identifier hs-type">Builder</span></a></span></span><span>
</span><span id="line-186"></span><span id="execPut"><span class="annot"><span class="annottext">execPut :: forall a. PutM a -&gt; Builder
</span><a href="Data.Binary.Put.html#execPut"><span class="hs-identifier hs-var hs-var">execPut</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PairS a -&gt; Builder
forall a. PairS a -&gt; Builder
</span><a href="Data.Binary.Put.html#sndS"><span class="hs-identifier hs-var">sndS</span></a></span><span> </span><span class="annot"><span class="annottext">(PairS a -&gt; Builder) -&gt; (PutM a -&gt; PairS a) -&gt; PutM a -&gt; Builder
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">PutM a -&gt; PairS a
forall a. PutM a -&gt; PairS a
</span><a href="Data.Binary.Put.html#unPut"><span class="hs-identifier hs-var hs-var">unPut</span></a></span><span>
</span><span id="line-187"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#execPut"><span class="hs-pragma hs-type">execPut</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-188"></span><span>
</span><span id="line-189"></span><span class="hs-comment">-- | Run the 'Put' monad with a serialiser</span><span>
</span><span id="line-190"></span><span class="annot"><a href="Data.Binary.Put.html#runPut"><span class="hs-identifier hs-type">runPut</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">L.ByteString</span></a></span><span>
</span><span id="line-191"></span><span id="runPut"><span class="annot"><span class="annottext">runPut :: PutM () -&gt; ByteString
</span><a href="Data.Binary.Put.html#runPut"><span class="hs-identifier hs-var hs-var">runPut</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; ByteString
</span><a href="../../bytestring/src/Data.ByteString.Builder.html#toLazyByteString"><span class="hs-identifier hs-var">toLazyByteString</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; ByteString)
-&gt; (PutM () -&gt; Builder) -&gt; PutM () -&gt; ByteString
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">PairS () -&gt; Builder
forall a. PairS a -&gt; Builder
</span><a href="Data.Binary.Put.html#sndS"><span class="hs-identifier hs-var">sndS</span></a></span><span> </span><span class="annot"><span class="annottext">(PairS () -&gt; Builder)
-&gt; (PutM () -&gt; PairS ()) -&gt; PutM () -&gt; Builder
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">PutM () -&gt; PairS ()
forall a. PutM a -&gt; PairS a
</span><a href="Data.Binary.Put.html#unPut"><span class="hs-identifier hs-var hs-var">unPut</span></a></span><span>
</span><span id="line-192"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#runPut"><span class="hs-pragma hs-type">runPut</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-193"></span><span>
</span><span id="line-194"></span><span class="hs-comment">-- | Run the 'Put' monad with a serialiser and get its result</span><span>
</span><span id="line-195"></span><span id="local-6989586621679056030"><span class="annot"><a href="Data.Binary.Put.html#runPutM"><span class="hs-identifier hs-type">runPutM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#PutM"><span class="hs-identifier hs-type">PutM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679056030"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679056030"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">L.ByteString</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-196"></span><span id="runPutM"><span class="annot"><span class="annottext">runPutM :: forall a. PutM a -&gt; (a, ByteString)
</span><a href="Data.Binary.Put.html#runPutM"><span class="hs-identifier hs-var hs-var">runPutM</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Data.Binary.Put.html#PairS"><span class="hs-identifier hs-type">PairS</span></a></span><span> </span><span id="local-6989586621679055877"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055877"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621679055876"><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055876"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679055877"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; ByteString
</span><a href="../../bytestring/src/Data.ByteString.Builder.html#toLazyByteString"><span class="hs-identifier hs-var">toLazyByteString</span></a></span><span> </span><span class="annot"><span class="annottext">Builder
</span><a href="#local-6989586621679055876"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-197"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#runPutM"><span class="hs-pragma hs-type">runPutM</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-198"></span><span>
</span><span id="line-199"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-200"></span><span>
</span><span id="line-201"></span><span class="hs-comment">-- | Pop the ByteString we have constructed so far, if any, yielding a</span><span>
</span><span id="line-202"></span><span class="hs-comment">-- new chunk in the result ByteString.</span><span>
</span><span id="line-203"></span><span class="annot"><a href="Data.Binary.Put.html#flush"><span class="hs-identifier hs-type">flush</span></a></span><span>               </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-204"></span><span id="flush"><span class="annot"><span class="annottext">flush :: PutM ()
</span><a href="Data.Binary.Put.html#flush"><span class="hs-identifier hs-var hs-var">flush</span></a></span></span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">Builder
</span><a href="../../bytestring/src/Data.ByteString.Builder.Internal.html#flush"><span class="hs-identifier hs-var">B.flush</span></a></span><span>
</span><span id="line-205"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#flush"><span class="hs-pragma hs-type">flush</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-206"></span><span>
</span><span id="line-207"></span><span class="hs-comment">-- | Efficiently write a byte into the output buffer</span><span>
</span><span id="line-208"></span><span class="annot"><a href="Data.Binary.Put.html#putWord8"><span class="hs-identifier hs-type">putWord8</span></a></span><span>            </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word8"><span class="hs-identifier hs-type">Word8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-209"></span><span id="putWord8"><span class="annot"><span class="annottext">putWord8 :: Word8 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putWord8"><span class="hs-identifier hs-var hs-var">putWord8</span></a></span></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Word8 -&gt; Builder) -&gt; Word8 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Builder
</span><a href="Data.Binary.Builder.html#singleton"><span class="hs-identifier hs-var">B.singleton</span></a></span><span>
</span><span id="line-210"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord8"><span class="hs-pragma hs-type">putWord8</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-211"></span><span>
</span><span id="line-212"></span><span class="hs-comment">-- | Efficiently write a signed byte into the output buffer</span><span>
</span><span id="line-213"></span><span class="annot"><a href="Data.Binary.Put.html#putInt8"><span class="hs-identifier hs-type">putInt8</span></a></span><span>            </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int8"><span class="hs-identifier hs-type">Int8</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-214"></span><span id="putInt8"><span class="annot"><span class="annottext">putInt8 :: Int8 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putInt8"><span class="hs-identifier hs-var hs-var">putInt8</span></a></span></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Int8 -&gt; Builder) -&gt; Int8 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Word8 -&gt; Builder
</span><a href="Data.Binary.Builder.html#singleton"><span class="hs-identifier hs-var">B.singleton</span></a></span><span> </span><span class="annot"><span class="annottext">(Word8 -&gt; Builder) -&gt; (Int8 -&gt; Word8) -&gt; Int8 -&gt; Builder
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int8 -&gt; Word8
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="../../base/src/GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span>
</span><span id="line-215"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt8"><span class="hs-pragma hs-type">putInt8</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-216"></span><span>
</span><span id="line-217"></span><span class="hs-comment">-- | An efficient primitive to write a strict ByteString into the output buffer.</span><span>
</span><span id="line-218"></span><span class="hs-comment">-- It flushes the current buffer, and writes the argument into a new chunk.</span><span>
</span><span id="line-219"></span><span class="annot"><a href="Data.Binary.Put.html#putByteString"><span class="hs-identifier hs-type">putByteString</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Internal.html#ByteString"><span class="hs-identifier hs-type">S.ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-220"></span><span id="putByteString"><span class="annot"><span class="annottext">putByteString :: ByteString -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putByteString"><span class="hs-identifier hs-var hs-var">putByteString</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ())
-&gt; (ByteString -&gt; Builder) -&gt; ByteString -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Builder
</span><a href="Data.Binary.Builder.html#fromByteString"><span class="hs-identifier hs-var">B.fromByteString</span></a></span><span>
</span><span id="line-221"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putByteString"><span class="hs-pragma hs-type">putByteString</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-222"></span><span>
</span><span id="line-223"></span><span class="hs-comment">-- | Write a lazy ByteString efficiently, simply appending the lazy</span><span>
</span><span id="line-224"></span><span class="hs-comment">-- ByteString chunks to the output buffer</span><span>
</span><span id="line-225"></span><span class="annot"><a href="Data.Binary.Put.html#putLazyByteString"><span class="hs-identifier hs-type">putLazyByteString</span></a></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Lazy.Internal.html#ByteString"><span class="hs-identifier hs-type">L.ByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-226"></span><span id="putLazyByteString"><span class="annot"><span class="annottext">putLazyByteString :: ByteString -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putLazyByteString"><span class="hs-identifier hs-var hs-var">putLazyByteString</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ())
-&gt; (ByteString -&gt; Builder) -&gt; ByteString -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ByteString -&gt; Builder
</span><a href="Data.Binary.Builder.html#fromLazyByteString"><span class="hs-identifier hs-var">B.fromLazyByteString</span></a></span><span>
</span><span id="line-227"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putLazyByteString"><span class="hs-pragma hs-type">putLazyByteString</span></a></span><span> </span><span class="hs-pragma">#-}</span><span class="hs-cpp">

#if MIN_VERSION_bytestring(0,10,4)
</span><span class="hs-comment">-- | Write 'ShortByteString' to the buffer</span><span>
</span><span id="line-231"></span><span class="annot"><a href="Data.Binary.Put.html#putShortByteString"><span class="hs-identifier hs-type">putShortByteString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../bytestring/src/Data.ByteString.Short.Internal.html#ShortByteString"><span class="hs-identifier hs-type">ShortByteString</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-232"></span><span id="putShortByteString"><span class="annot"><span class="annottext">putShortByteString :: ShortByteString -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putShortByteString"><span class="hs-identifier hs-var hs-var">putShortByteString</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ())
-&gt; (ShortByteString -&gt; Builder) -&gt; ShortByteString -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ShortByteString -&gt; Builder
</span><a href="Data.Binary.Builder.html#fromShortByteString"><span class="hs-identifier hs-var">B.fromShortByteString</span></a></span><span>
</span><span id="line-233"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putShortByteString"><span class="hs-pragma hs-type">putShortByteString</span></a></span><span> </span><span class="hs-pragma">#-}</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-236"></span><span class="hs-comment">-- | Write a Word16 in big endian format</span><span>
</span><span id="line-237"></span><span class="annot"><a href="Data.Binary.Put.html#putWord16be"><span class="hs-identifier hs-type">putWord16be</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier hs-type">Word16</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-238"></span><span id="putWord16be"><span class="annot"><span class="annottext">putWord16be :: Word16 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putWord16be"><span class="hs-identifier hs-var hs-var">putWord16be</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Word16 -&gt; Builder) -&gt; Word16 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Builder
</span><a href="Data.Binary.Builder.html#putWord16be"><span class="hs-identifier hs-var">B.putWord16be</span></a></span><span>
</span><span id="line-239"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord16be"><span class="hs-pragma hs-type">putWord16be</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-240"></span><span>
</span><span id="line-241"></span><span class="hs-comment">-- | Write a Word16 in little endian format</span><span>
</span><span id="line-242"></span><span class="annot"><a href="Data.Binary.Put.html#putWord16le"><span class="hs-identifier hs-type">putWord16le</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier hs-type">Word16</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-243"></span><span id="putWord16le"><span class="annot"><span class="annottext">putWord16le :: Word16 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putWord16le"><span class="hs-identifier hs-var hs-var">putWord16le</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Word16 -&gt; Builder) -&gt; Word16 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Builder
</span><a href="Data.Binary.Builder.html#putWord16le"><span class="hs-identifier hs-var">B.putWord16le</span></a></span><span>
</span><span id="line-244"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord16le"><span class="hs-pragma hs-type">putWord16le</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-245"></span><span>
</span><span id="line-246"></span><span class="hs-comment">-- | Write a Word32 in big endian format</span><span>
</span><span id="line-247"></span><span class="annot"><a href="Data.Binary.Put.html#putWord32be"><span class="hs-identifier hs-type">putWord32be</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-248"></span><span id="putWord32be"><span class="annot"><span class="annottext">putWord32be :: Word32 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putWord32be"><span class="hs-identifier hs-var hs-var">putWord32be</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Word32 -&gt; Builder) -&gt; Word32 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Builder
</span><a href="Data.Binary.Builder.html#putWord32be"><span class="hs-identifier hs-var">B.putWord32be</span></a></span><span>
</span><span id="line-249"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord32be"><span class="hs-pragma hs-type">putWord32be</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-250"></span><span>
</span><span id="line-251"></span><span class="hs-comment">-- | Write a Word32 in little endian format</span><span>
</span><span id="line-252"></span><span class="annot"><a href="Data.Binary.Put.html#putWord32le"><span class="hs-identifier hs-type">putWord32le</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-253"></span><span id="putWord32le"><span class="annot"><span class="annottext">putWord32le :: Word32 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putWord32le"><span class="hs-identifier hs-var hs-var">putWord32le</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Word32 -&gt; Builder) -&gt; Word32 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Builder
</span><a href="Data.Binary.Builder.html#putWord32le"><span class="hs-identifier hs-var">B.putWord32le</span></a></span><span>
</span><span id="line-254"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord32le"><span class="hs-pragma hs-type">putWord32le</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-255"></span><span>
</span><span id="line-256"></span><span class="hs-comment">-- | Write a Word64 in big endian format</span><span>
</span><span id="line-257"></span><span class="annot"><a href="Data.Binary.Put.html#putWord64be"><span class="hs-identifier hs-type">putWord64be</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-258"></span><span id="putWord64be"><span class="annot"><span class="annottext">putWord64be :: Word64 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putWord64be"><span class="hs-identifier hs-var hs-var">putWord64be</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Word64 -&gt; Builder) -&gt; Word64 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Builder
</span><a href="Data.Binary.Builder.html#putWord64be"><span class="hs-identifier hs-var">B.putWord64be</span></a></span><span>
</span><span id="line-259"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord64be"><span class="hs-pragma hs-type">putWord64be</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-260"></span><span>
</span><span id="line-261"></span><span class="hs-comment">-- | Write a Word64 in little endian format</span><span>
</span><span id="line-262"></span><span class="annot"><a href="Data.Binary.Put.html#putWord64le"><span class="hs-identifier hs-type">putWord64le</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-263"></span><span id="putWord64le"><span class="annot"><span class="annottext">putWord64le :: Word64 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putWord64le"><span class="hs-identifier hs-var hs-var">putWord64le</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Word64 -&gt; Builder) -&gt; Word64 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Builder
</span><a href="Data.Binary.Builder.html#putWord64le"><span class="hs-identifier hs-var">B.putWord64le</span></a></span><span>
</span><span id="line-264"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord64le"><span class="hs-pragma hs-type">putWord64le</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-265"></span><span>
</span><span id="line-266"></span><span class="hs-comment">-- | Write an Int16 in big endian format</span><span>
</span><span id="line-267"></span><span class="annot"><a href="Data.Binary.Put.html#putInt16be"><span class="hs-identifier hs-type">putInt16be</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int16"><span class="hs-identifier hs-type">Int16</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-268"></span><span id="putInt16be"><span class="annot"><span class="annottext">putInt16be :: Int16 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putInt16be"><span class="hs-identifier hs-var hs-var">putInt16be</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Int16 -&gt; Builder) -&gt; Int16 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int16 -&gt; Builder
</span><a href="Data.Binary.Builder.html#putInt16be"><span class="hs-identifier hs-var">B.putInt16be</span></a></span><span>
</span><span id="line-269"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt16be"><span class="hs-pragma hs-type">putInt16be</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-270"></span><span>
</span><span id="line-271"></span><span class="hs-comment">-- | Write an Int16 in little endian format</span><span>
</span><span id="line-272"></span><span class="annot"><a href="Data.Binary.Put.html#putInt16le"><span class="hs-identifier hs-type">putInt16le</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int16"><span class="hs-identifier hs-type">Int16</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-273"></span><span id="putInt16le"><span class="annot"><span class="annottext">putInt16le :: Int16 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putInt16le"><span class="hs-identifier hs-var hs-var">putInt16le</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Int16 -&gt; Builder) -&gt; Int16 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int16 -&gt; Builder
</span><a href="Data.Binary.Builder.html#putInt16le"><span class="hs-identifier hs-var">B.putInt16le</span></a></span><span>
</span><span id="line-274"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt16le"><span class="hs-pragma hs-type">putInt16le</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-275"></span><span>
</span><span id="line-276"></span><span class="hs-comment">-- | Write an Int32 in big endian format</span><span>
</span><span id="line-277"></span><span class="annot"><a href="Data.Binary.Put.html#putInt32be"><span class="hs-identifier hs-type">putInt32be</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int32"><span class="hs-identifier hs-type">Int32</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-278"></span><span id="putInt32be"><span class="annot"><span class="annottext">putInt32be :: Int32 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putInt32be"><span class="hs-identifier hs-var hs-var">putInt32be</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Int32 -&gt; Builder) -&gt; Int32 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int32 -&gt; Builder
</span><a href="Data.Binary.Builder.html#putInt32be"><span class="hs-identifier hs-var">B.putInt32be</span></a></span><span>
</span><span id="line-279"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt32be"><span class="hs-pragma hs-type">putInt32be</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-280"></span><span>
</span><span id="line-281"></span><span class="hs-comment">-- | Write an Int32 in little endian format</span><span>
</span><span id="line-282"></span><span class="annot"><a href="Data.Binary.Put.html#putInt32le"><span class="hs-identifier hs-type">putInt32le</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int32"><span class="hs-identifier hs-type">Int32</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-283"></span><span id="putInt32le"><span class="annot"><span class="annottext">putInt32le :: Int32 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putInt32le"><span class="hs-identifier hs-var hs-var">putInt32le</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Int32 -&gt; Builder) -&gt; Int32 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int32 -&gt; Builder
</span><a href="Data.Binary.Builder.html#putInt32le"><span class="hs-identifier hs-var">B.putInt32le</span></a></span><span>
</span><span id="line-284"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt32le"><span class="hs-pragma hs-type">putInt32le</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-285"></span><span>
</span><span id="line-286"></span><span class="hs-comment">-- | Write an Int64 in big endian format</span><span>
</span><span id="line-287"></span><span class="annot"><a href="Data.Binary.Put.html#putInt64be"><span class="hs-identifier hs-type">putInt64be</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-288"></span><span id="putInt64be"><span class="annot"><span class="annottext">putInt64be :: Int64 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putInt64be"><span class="hs-identifier hs-var hs-var">putInt64be</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Int64 -&gt; Builder) -&gt; Int64 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Builder
</span><a href="Data.Binary.Builder.html#putInt64be"><span class="hs-identifier hs-var">B.putInt64be</span></a></span><span>
</span><span id="line-289"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt64be"><span class="hs-pragma hs-type">putInt64be</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-290"></span><span>
</span><span id="line-291"></span><span class="hs-comment">-- | Write an Int64 in little endian format</span><span>
</span><span id="line-292"></span><span class="annot"><a href="Data.Binary.Put.html#putInt64le"><span class="hs-identifier hs-type">putInt64le</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-293"></span><span id="putInt64le"><span class="annot"><span class="annottext">putInt64le :: Int64 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putInt64le"><span class="hs-identifier hs-var hs-var">putInt64le</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Int64 -&gt; Builder) -&gt; Int64 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Builder
</span><a href="Data.Binary.Builder.html#putInt64le"><span class="hs-identifier hs-var">B.putInt64le</span></a></span><span>
</span><span id="line-294"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt64le"><span class="hs-pragma hs-type">putInt64le</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-295"></span><span>
</span><span id="line-296"></span><span>
</span><span id="line-297"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-298"></span><span>
</span><span id="line-299"></span><span class="hs-comment">-- | /O(1)./ Write a single native machine word. The word is</span><span>
</span><span id="line-300"></span><span class="hs-comment">-- written in host order, host endian form, for the machine you're on.</span><span>
</span><span id="line-301"></span><span class="hs-comment">-- On a 64 bit machine the Word is an 8 byte value, on a 32 bit machine,</span><span>
</span><span id="line-302"></span><span class="hs-comment">-- 4 bytes. Values written this way are not portable to</span><span>
</span><span id="line-303"></span><span class="hs-comment">-- different endian or word sized machines, without conversion.</span><span>
</span><span id="line-304"></span><span class="hs-comment">--</span><span>
</span><span id="line-305"></span><span class="annot"><a href="Data.Binary.Put.html#putWordhost"><span class="hs-identifier hs-type">putWordhost</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Word</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-306"></span><span id="putWordhost"><span class="annot"><span class="annottext">putWordhost :: Word -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putWordhost"><span class="hs-identifier hs-var hs-var">putWordhost</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Word -&gt; Builder) -&gt; Word -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Word -&gt; Builder
</span><a href="Data.Binary.Builder.html#putWordhost"><span class="hs-identifier hs-var">B.putWordhost</span></a></span><span>
</span><span id="line-307"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWordhost"><span class="hs-pragma hs-type">putWordhost</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-308"></span><span>
</span><span id="line-309"></span><span class="hs-comment">-- | /O(1)./ Write a Word16 in native host order and host endianness.</span><span>
</span><span id="line-310"></span><span class="hs-comment">-- For portability issues see @putWordhost@.</span><span>
</span><span id="line-311"></span><span class="annot"><a href="Data.Binary.Put.html#putWord16host"><span class="hs-identifier hs-type">putWord16host</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word16"><span class="hs-identifier hs-type">Word16</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-312"></span><span id="putWord16host"><span class="annot"><span class="annottext">putWord16host :: Word16 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putWord16host"><span class="hs-identifier hs-var hs-var">putWord16host</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Word16 -&gt; Builder) -&gt; Word16 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Word16 -&gt; Builder
</span><a href="Data.Binary.Builder.html#putWord16host"><span class="hs-identifier hs-var">B.putWord16host</span></a></span><span>
</span><span id="line-313"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord16host"><span class="hs-pragma hs-type">putWord16host</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-314"></span><span>
</span><span id="line-315"></span><span class="hs-comment">-- | /O(1)./ Write a Word32 in native host order and host endianness.</span><span>
</span><span id="line-316"></span><span class="hs-comment">-- For portability issues see @putWordhost@.</span><span>
</span><span id="line-317"></span><span class="annot"><a href="Data.Binary.Put.html#putWord32host"><span class="hs-identifier hs-type">putWord32host</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word32"><span class="hs-identifier hs-type">Word32</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-318"></span><span id="putWord32host"><span class="annot"><span class="annottext">putWord32host :: Word32 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putWord32host"><span class="hs-identifier hs-var hs-var">putWord32host</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Word32 -&gt; Builder) -&gt; Word32 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; Builder
</span><a href="Data.Binary.Builder.html#putWord32host"><span class="hs-identifier hs-var">B.putWord32host</span></a></span><span>
</span><span id="line-319"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord32host"><span class="hs-pragma hs-type">putWord32host</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-320"></span><span>
</span><span id="line-321"></span><span class="hs-comment">-- | /O(1)./ Write a Word64 in native host order</span><span>
</span><span id="line-322"></span><span class="hs-comment">-- On a 32 bit machine we write two host order Word32s, in big endian form.</span><span>
</span><span id="line-323"></span><span class="hs-comment">-- For portability issues see @putWordhost@.</span><span>
</span><span id="line-324"></span><span class="annot"><a href="Data.Binary.Put.html#putWord64host"><span class="hs-identifier hs-type">putWord64host</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Word.html#Word64"><span class="hs-identifier hs-type">Word64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-325"></span><span id="putWord64host"><span class="annot"><span class="annottext">putWord64host :: Word64 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putWord64host"><span class="hs-identifier hs-var hs-var">putWord64host</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Word64 -&gt; Builder) -&gt; Word64 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; Builder
</span><a href="Data.Binary.Builder.html#putWord64host"><span class="hs-identifier hs-var">B.putWord64host</span></a></span><span>
</span><span id="line-326"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putWord64host"><span class="hs-pragma hs-type">putWord64host</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-327"></span><span>
</span><span id="line-328"></span><span class="hs-comment">-- | /O(1)./ Write a single native machine word. The word is</span><span>
</span><span id="line-329"></span><span class="hs-comment">-- written in host order, host endian form, for the machine you're on.</span><span>
</span><span id="line-330"></span><span class="hs-comment">-- On a 64 bit machine the Int is an 8 byte value, on a 32 bit machine,</span><span>
</span><span id="line-331"></span><span class="hs-comment">-- 4 bytes. Values written this way are not portable to</span><span>
</span><span id="line-332"></span><span class="hs-comment">-- different endian or word sized machines, without conversion.</span><span>
</span><span id="line-333"></span><span class="hs-comment">--</span><span>
</span><span id="line-334"></span><span class="annot"><a href="Data.Binary.Put.html#putInthost"><span class="hs-identifier hs-type">putInthost</span></a></span><span>         </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-335"></span><span id="putInthost"><span class="annot"><span class="annottext">putInthost :: Int -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putInthost"><span class="hs-identifier hs-var hs-var">putInthost</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Int -&gt; Builder) -&gt; Int -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Builder
</span><a href="Data.Binary.Builder.html#putInthost"><span class="hs-identifier hs-var">B.putInthost</span></a></span><span>
</span><span id="line-336"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInthost"><span class="hs-pragma hs-type">putInthost</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-337"></span><span>
</span><span id="line-338"></span><span class="hs-comment">-- | /O(1)./ Write an Int16 in native host order and host endianness.</span><span>
</span><span id="line-339"></span><span class="hs-comment">-- For portability issues see @putInthost@.</span><span>
</span><span id="line-340"></span><span class="annot"><a href="Data.Binary.Put.html#putInt16host"><span class="hs-identifier hs-type">putInt16host</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int16"><span class="hs-identifier hs-type">Int16</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-341"></span><span id="putInt16host"><span class="annot"><span class="annottext">putInt16host :: Int16 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putInt16host"><span class="hs-identifier hs-var hs-var">putInt16host</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Int16 -&gt; Builder) -&gt; Int16 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int16 -&gt; Builder
</span><a href="Data.Binary.Builder.html#putInt16host"><span class="hs-identifier hs-var">B.putInt16host</span></a></span><span>
</span><span id="line-342"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt16host"><span class="hs-pragma hs-type">putInt16host</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-343"></span><span>
</span><span id="line-344"></span><span class="hs-comment">-- | /O(1)./ Write an Int32 in native host order and host endianness.</span><span>
</span><span id="line-345"></span><span class="hs-comment">-- For portability issues see @putInthost@.</span><span>
</span><span id="line-346"></span><span class="annot"><a href="Data.Binary.Put.html#putInt32host"><span class="hs-identifier hs-type">putInt32host</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int32"><span class="hs-identifier hs-type">Int32</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-347"></span><span id="putInt32host"><span class="annot"><span class="annottext">putInt32host :: Int32 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putInt32host"><span class="hs-identifier hs-var hs-var">putInt32host</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Int32 -&gt; Builder) -&gt; Int32 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int32 -&gt; Builder
</span><a href="Data.Binary.Builder.html#putInt32host"><span class="hs-identifier hs-var">B.putInt32host</span></a></span><span>
</span><span id="line-348"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt32host"><span class="hs-pragma hs-type">putInt32host</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-349"></span><span>
</span><span id="line-350"></span><span class="hs-comment">-- | /O(1)./ Write an Int64 in native host order</span><span>
</span><span id="line-351"></span><span class="hs-comment">-- On a 32 bit machine we write two host order Int32s, in big endian form.</span><span>
</span><span id="line-352"></span><span class="hs-comment">-- For portability issues see @putInthost@.</span><span>
</span><span id="line-353"></span><span class="annot"><a href="Data.Binary.Put.html#putInt64host"><span class="hs-identifier hs-type">putInt64host</span></a></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Int.html#Int64"><span class="hs-identifier hs-type">Int64</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-354"></span><span id="putInt64host"><span class="annot"><span class="annottext">putInt64host :: Int64 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putInt64host"><span class="hs-identifier hs-var hs-var">putInt64host</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Int64 -&gt; Builder) -&gt; Int64 -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Int64 -&gt; Builder
</span><a href="Data.Binary.Builder.html#putInt64host"><span class="hs-identifier hs-var">B.putInt64host</span></a></span><span>
</span><span id="line-355"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putInt64host"><span class="hs-pragma hs-type">putInt64host</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-356"></span><span>
</span><span id="line-357"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-358"></span><span class="hs-comment">-- Floats/Doubles</span><span>
</span><span id="line-359"></span><span>
</span><span id="line-360"></span><span class="hs-comment">-- | Write a 'Float' in big endian IEEE-754 format.</span><span>
</span><span id="line-361"></span><span class="annot"><a href="Data.Binary.Put.html#putFloatbe"><span class="hs-identifier hs-type">putFloatbe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Float</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-362"></span><span id="putFloatbe"><span class="annot"><span class="annottext">putFloatbe :: Float -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putFloatbe"><span class="hs-identifier hs-var hs-var">putFloatbe</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putWord32be"><span class="hs-identifier hs-var">putWord32be</span></a></span><span> </span><span class="annot"><span class="annottext">(Word32 -&gt; PutM ()) -&gt; (Float -&gt; Word32) -&gt; Float -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Word32
</span><a href="Data.Binary.FloatCast.html#floatToWord"><span class="hs-identifier hs-var">floatToWord</span></a></span><span>
</span><span id="line-363"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putFloatbe"><span class="hs-pragma hs-type">putFloatbe</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-364"></span><span>
</span><span id="line-365"></span><span class="hs-comment">-- | Write a 'Float' in little endian IEEE-754 format.</span><span>
</span><span id="line-366"></span><span class="annot"><a href="Data.Binary.Put.html#putFloatle"><span class="hs-identifier hs-type">putFloatle</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Float</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-367"></span><span id="putFloatle"><span class="annot"><span class="annottext">putFloatle :: Float -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putFloatle"><span class="hs-identifier hs-var hs-var">putFloatle</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putWord32le"><span class="hs-identifier hs-var">putWord32le</span></a></span><span> </span><span class="annot"><span class="annottext">(Word32 -&gt; PutM ()) -&gt; (Float -&gt; Word32) -&gt; Float -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Word32
</span><a href="Data.Binary.FloatCast.html#floatToWord"><span class="hs-identifier hs-var">floatToWord</span></a></span><span>
</span><span id="line-368"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putFloatle"><span class="hs-pragma hs-type">putFloatle</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-369"></span><span>
</span><span id="line-370"></span><span class="hs-comment">-- | Write a 'Float' in native in IEEE-754 format and host endian.</span><span>
</span><span id="line-371"></span><span class="annot"><a href="Data.Binary.Put.html#putFloathost"><span class="hs-identifier hs-type">putFloathost</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Float</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-372"></span><span id="putFloathost"><span class="annot"><span class="annottext">putFloathost :: Float -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putFloathost"><span class="hs-identifier hs-var hs-var">putFloathost</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word32 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putWord32host"><span class="hs-identifier hs-var">putWord32host</span></a></span><span> </span><span class="annot"><span class="annottext">(Word32 -&gt; PutM ()) -&gt; (Float -&gt; Word32) -&gt; Float -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Float -&gt; Word32
</span><a href="Data.Binary.FloatCast.html#floatToWord"><span class="hs-identifier hs-var">floatToWord</span></a></span><span>
</span><span id="line-373"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putFloathost"><span class="hs-pragma hs-type">putFloathost</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-374"></span><span>
</span><span id="line-375"></span><span class="hs-comment">-- | Write a 'Double' in big endian IEEE-754 format.</span><span>
</span><span id="line-376"></span><span class="annot"><a href="Data.Binary.Put.html#putDoublebe"><span class="hs-identifier hs-type">putDoublebe</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Double</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-377"></span><span id="putDoublebe"><span class="annot"><span class="annottext">putDoublebe :: Double -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putDoublebe"><span class="hs-identifier hs-var hs-var">putDoublebe</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putWord64be"><span class="hs-identifier hs-var">putWord64be</span></a></span><span> </span><span class="annot"><span class="annottext">(Word64 -&gt; PutM ()) -&gt; (Double -&gt; Word64) -&gt; Double -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Word64
</span><a href="Data.Binary.FloatCast.html#doubleToWord"><span class="hs-identifier hs-var">doubleToWord</span></a></span><span>
</span><span id="line-378"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putDoublebe"><span class="hs-pragma hs-type">putDoublebe</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-379"></span><span>
</span><span id="line-380"></span><span class="hs-comment">-- | Write a 'Double' in little endian IEEE-754 format.</span><span>
</span><span id="line-381"></span><span class="annot"><a href="Data.Binary.Put.html#putDoublele"><span class="hs-identifier hs-type">putDoublele</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Double</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-382"></span><span id="putDoublele"><span class="annot"><span class="annottext">putDoublele :: Double -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putDoublele"><span class="hs-identifier hs-var hs-var">putDoublele</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putWord64le"><span class="hs-identifier hs-var">putWord64le</span></a></span><span> </span><span class="annot"><span class="annottext">(Word64 -&gt; PutM ()) -&gt; (Double -&gt; Word64) -&gt; Double -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Word64
</span><a href="Data.Binary.FloatCast.html#doubleToWord"><span class="hs-identifier hs-var">doubleToWord</span></a></span><span>
</span><span id="line-383"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putDoublele"><span class="hs-pragma hs-type">putDoublele</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-384"></span><span>
</span><span id="line-385"></span><span class="hs-comment">-- | Write a 'Double' in native in IEEE-754 format and host endian.</span><span>
</span><span id="line-386"></span><span class="annot"><a href="Data.Binary.Put.html#putDoublehost"><span class="hs-identifier hs-type">putDoublehost</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Double</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-387"></span><span id="putDoublehost"><span class="annot"><span class="annottext">putDoublehost :: Double -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putDoublehost"><span class="hs-identifier hs-var hs-var">putDoublehost</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Word64 -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putWord64host"><span class="hs-identifier hs-var">putWord64host</span></a></span><span> </span><span class="annot"><span class="annottext">(Word64 -&gt; PutM ()) -&gt; (Double -&gt; Word64) -&gt; Double -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Double -&gt; Word64
</span><a href="Data.Binary.FloatCast.html#doubleToWord"><span class="hs-identifier hs-var">doubleToWord</span></a></span><span>
</span><span id="line-388"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putDoublehost"><span class="hs-pragma hs-type">putDoublehost</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-389"></span><span>
</span><span id="line-390"></span><span class="hs-comment">------------------------------------------------------------------------</span><span>
</span><span id="line-391"></span><span class="hs-comment">-- Unicode</span><span>
</span><span id="line-392"></span><span>
</span><span id="line-393"></span><span class="hs-comment">-- | Write a character using UTF-8 encoding.</span><span>
</span><span id="line-394"></span><span class="annot"><a href="Data.Binary.Put.html#putCharUtf8"><span class="hs-identifier hs-type">putCharUtf8</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Char</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-395"></span><span id="putCharUtf8"><span class="annot"><span class="annottext">putCharUtf8 :: Char -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putCharUtf8"><span class="hs-identifier hs-var hs-var">putCharUtf8</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (Char -&gt; Builder) -&gt; Char -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Builder
</span><a href="Data.Binary.Builder.html#putCharUtf8"><span class="hs-identifier hs-var">B.putCharUtf8</span></a></span><span>
</span><span id="line-396"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putCharUtf8"><span class="hs-pragma hs-type">putCharUtf8</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-397"></span><span>
</span><span id="line-398"></span><span class="hs-comment">-- | Write a String using UTF-8 encoding.</span><span>
</span><span id="line-399"></span><span class="annot"><a href="Data.Binary.Put.html#putStringUtf8"><span class="hs-identifier hs-type">putStringUtf8</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#Put"><span class="hs-identifier hs-type">Put</span></a></span><span>
</span><span id="line-400"></span><span id="putStringUtf8"><span class="annot"><span class="annottext">putStringUtf8 :: String -&gt; PutM ()
</span><a href="Data.Binary.Put.html#putStringUtf8"><span class="hs-identifier hs-var hs-var">putStringUtf8</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Builder -&gt; PutM ()
</span><a href="Data.Binary.Put.html#tell"><span class="hs-identifier hs-var">tell</span></a></span><span> </span><span class="annot"><span class="annottext">(Builder -&gt; PutM ()) -&gt; (String -&gt; Builder) -&gt; String -&gt; PutM ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Builder
</span><a href="Data.Binary.Builder.html#putStringUtf8"><span class="hs-identifier hs-var">B.putStringUtf8</span></a></span><span>
</span><span id="line-401"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Data.Binary.Put.html#putStringUtf8"><span class="hs-pragma hs-type">putStringUtf8</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-402"></span></pre></body></html>